package ldh.serialize.type;

import java.io.IOException;

import ldh.serialize.BinarySerialized;
import ldh.serialize.io.ByteBuf;
import ldh.serialize.util.SerializedUtil;

public class LongSerialized implements BinarySerialized<Long> {

	@Override
	public void write(ByteBuf out, Long num) throws IOException {
		SerializedUtil.writeLong(out, num);
	}

	@Override
	public Long read(ByteBuf in) throws IOException {
		return SerializedUtil.readLong(in);
	}

	@Override
	public Class<Long> getClassType() {
		return Long.class;
	}
}
